import Request from '@/utils/request.js'
let request = new Request().http
let rootPath = "/bankcard";

function getListByVo(param, pageVo = undefined) {
	if (pageVo != undefined) {
		return request({
			url: rootPath + "/getListByVo", //请求头
			method: "POST", //请求方式
			data: JSON.stringify({
				page: pageVo.page,
				size: pageVo.size,
				vo: param
			})
		})
	} else {
		return request({
			url: rootPath + "/getListByVo", //请求头
			method: "POST", //请求方式
			data: JSON.stringify({
				vo: param
			})
		})
	}
}

function getById(id) {
	return request({
		url: rootPath + "/getById", //请求头
		method: "GET", //请求方式
		data: {
			id
		}
	})
}
function save(vo) {
	return request({
		url: rootPath + "/save", //请求头
		method: "POST", //请求方式
		data: {
			vo: vo
		}
	})
}
function del(id) {
	return request({
		url: rootPath + "/delById", //请求头
		method: "POST", //请求方式
		data: {
			id: id
		}
	})
}
// 使用ES模块导出语法
export {
	getListByVo,
	getById,
	save,
	del
}